home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / SpeechRecognition.p < prev    next >
Encoding:
Text File  |  1996-05-03  |  20.2 KB  |  427 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SpeechRecognition.p
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.                  Package:    Universal Interfaces 2.1.3
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT SpeechRecognition;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __SPEECHRECOGNITION__}
  30. {$SETC __SPEECHRECOGNITION__ := 1}
  31.  
  32. {$I+}
  33. {$SETC SpeechRecognitionIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36. {$IFC UNDEFINED __MEMORY__}
  37. {$I Memory.p}
  38. {$ENDC}
  39.  
  40. {$PUSH}
  41. {$ALIGN MAC68K}
  42. {$LibExport+}
  43.  
  44.  
  45. CONST
  46.     gestaltSpeechRecognitionVersion = 'srtb';
  47.     gestaltSpeechRecognitionAttr = 'srta';
  48.     gestaltDesktopSpeechRecognition = $00000001;
  49.     gestaltTelephoneSpeechRecognition = $00000002;
  50. {  Error Codes [Speech recognition gets -5100 through -5199]  }
  51.     kSRNotAvailable                = -5100;                        {  the service requested is not avail or applicable  }
  52.     kSRInternalError            = -5101;                        {  a system internal or hardware error condition  }
  53.     kSRComponentNotFound        = -5102;                        {  a needed system resource was not located  }
  54.     kSROutOfMemory                = -5103;                        {  an out of memory error occurred in the toolbox memory space  }
  55.     kSRNotASpeechObject            = -5104;                        {  the object specified is no longer or never was valid  }
  56.     kSRBadParameter                = -5105;                        {  an invalid parameter was specified  }
  57.     kSRParamOutOfRange            = -5106;                        {  when we say 0-100, don't pass in 101.  }
  58.     kSRBadSelector                = -5107;                        {  an unrecognized selector was specified  }
  59.     kSRBufferTooSmall            = -5108;                        {  returned from attribute access functions  }
  60.     kSRNotARecSystem            = -5109;                        {  the object used was not a SRRecognitionSystem  }
  61.     kSRFeedbackNotAvail            = -5110;                        {  there is no feedback window associated with SRRecognizer  }
  62.     kSRCantSetProperty            = -5111;                        {  a non-settable property was specified  }
  63.     kSRCantGetProperty            = -5112;                        {  a non-gettable property was specified  }
  64.     kSRCantSetDuringRecognition    = -5113;                        {  the property can't be set while recognition is in progress -- do before or between utterances.  }
  65.     kSRAlreadyListening            = -5114;                        {  in response to SRStartListening  }
  66.     kSRNotListeningState        = -5115;                        {  in response to SRStopListening  }
  67.     kSRModelMismatch            = -5116;                        {  no acoustical models are avail to match request  }
  68.     kSRNoClientLanguageModel    = -5117;                        {  trying to access a non-specified SRLanguageModel  }
  69.     kSRNoPendingUtterances        = -5118;                        {  nothing to continue search on  }
  70.     kSRRecognitionCanceled        = -5119;                        {  an abort error occurred during search  }
  71.     kSRRecognitionDone            = -5120;                        {  search has finished, but nothing was recognized  }
  72.     kSROtherRecAlreadyModal        = -5121;                        {  another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now  }
  73.     kSRHasNoSubItems            = -5122;                        {  SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM.  }
  74.     kSRSubItemNotFound            = -5123;                        {  returned when accessing a non-existent sub item of a container  }
  75.     kSRLanguageModelTooBig        = -5124;                        {  Cant build language models so big  }
  76.     kSRAlreadyReleased            = -5125;                        {  this object has already been released before  }
  77.     kSRAlreadyFinished            = -5126;                        {  the language model can't be finished twice  }
  78.     kSRWordNotFound                = -5127;                        {  the spelling couldn't be found in lookup(s)  }
  79.     kSRNotFinishedWithRejection    = -5128;                        {  property not found because the LMObj is not finished with rejection  }
  80.     kSRExpansionTooDeep            = -5129;                        {  Language model is left recursive or is embedded too many levels  }
  81.     kSRTooManyElements            = -5130;                        {  Too many elements added to phrase or path or other langauge model object  }
  82.     kSRCantAdd                    = -5131;                        {  Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)     }
  83.     kSRSndInSourceDisconnected    = -5132;                        {  Sound input source is disconnected  }
  84.     kSRCantReadLanguageObject    = -5133;                        {  An error while trying to create new Language object from file or pointer -- possibly bad format  }
  85.                                                                 {  non-release debugging error codes are included here  }
  86.     kSRNotImplementedYet        = -5199;                        {  you'd better wait for this feature in a future release  }
  87. {  Type Definitions  }
  88.  
  89. TYPE
  90.     SRSpeechObject = ^LONGINT;
  91.     SRRecognitionSystem                    = SRSpeechObject;
  92.     SRRecognizer                        = SRSpeechObject;
  93.     SRSpeechSource                        = SRSpeechObject;
  94.     SRRecognitionResult                    = SRSpeechSource;
  95.     SRLanguageObject                    = SRSpeechObject;
  96.     SRLanguageModel                        = SRLanguageObject;
  97.     SRPath                                = SRLanguageObject;
  98.     SRPhrase                            = SRLanguageObject;
  99.     SRWord                                = SRLanguageObject;
  100. {  between 0 and 100  }
  101.     SRSpeedSetting                        = INTEGER;
  102. {  between 0 and 100  }
  103.     SRRejectionLevel                    = INTEGER;
  104. {  When an event occurs, the user supplied proc will be called with a pointer     }
  105. {     to the param passed in and a flag to indicate conditions such                 }
  106. {     as interrupt time or system background time.                                 }
  107.     SRCallBackStructPtr = ^SRCallBackStruct;
  108.     SRCallBackStruct = RECORD
  109.         what:                    LONGINT;                                {  one of notification flags  }
  110.         message:                LONGINT;                                {  contains SRRecognitionResult id  }
  111.         instance:                SRRecognizer;                            {  ID of recognizer being notified  }
  112.         status:                    OSErr;                                    {  result status of last search  }
  113.         flags:                    INTEGER;                                {  non-zero if occurs during interrupt  }
  114.         refCon:                    LONGINT;                                {  user defined - set from SRCallBackParam  }
  115.     END;
  116.  
  117. {  Call back procedure definition  }
  118.     SRCallBackProcPtr = ProcPtr;  { PROCEDURE SRCallBack(VAR param: SRCallBackStruct); }
  119.  
  120.     SRCallBackUPP = UniversalProcPtr;
  121.  
  122. CONST
  123.     uppSRCallBackProcInfo = $000000C0;
  124.  
  125. FUNCTION NewSRCallBackProc(userRoutine: SRCallBackProcPtr): SRCallBackUPP;
  126.     {$IFC NOT GENERATINGCFM }
  127.     INLINE $2E9F;
  128.     {$ENDC}
  129.  
  130. PROCEDURE CallSRCallBackProc(VAR param: SRCallBackStruct; userRoutine: SRCallBackUPP);
  131.     {$IFC NOT GENERATINGCFM}
  132.     INLINE $205F, $4E90;
  133.     {$ENDC}
  134.  
  135. TYPE
  136.     SRCallBackParamPtr = ^SRCallBackParam;
  137.     SRCallBackParam = RECORD
  138.         callBack:                SRCallBackUPP;
  139.         refCon:                    LONGINT;
  140.     END;
  141.  
  142. {  Recognition System Types  }
  143.  
  144. CONST
  145.     kSRDefaultRecognitionSystemID = 0;
  146. {  Recognition System Properties  }
  147.     kSRFeedbackAndListeningModes = 'fbwn';                        {  short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes  }
  148.     kSRRejectedWord                = 'rejq';                        {  the SRWord used to represent a rejection  }
  149.     kSRCleanupOnClientExit        = 'clup';                        {  Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits  }
  150.     kSRNoFeedbackNoListenModes    = 0;                            {  next allocated recognizer has no feedback window and doesn't use listening modes     }
  151.     kSRHasFeedbackHasListenModes = 1;                            {  next allocated recognizer has feedback window and uses listening modes              }
  152.     kSRNoFeedbackHasListenModes    = 2;                            {  next allocated recognizer has no feedback window but does use listening modes      }
  153. {  Speech Source Types  }
  154.     kSRDefaultSpeechSource        = 0;
  155.     kSRLiveDesktopSpeechSource    = 'dklv';                        {  live desktop sound input  }
  156.     kSRCanned22kHzSpeechSource    = 'ca22';                        {  AIFF file based 16 bit, 22.050 KHz sound input  }
  157. {  Notification via Apple Event or Callback  }
  158. {  Notification Flags  }
  159.     kSRNotifyRecognitionBeginning = $00000001;                    {  recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition  }
  160.     kSRNotifyRecognitionDone    = $00000002;                    {  recognition has terminated. result (if any) is available.  }
  161. {  Apple Event selectors  }
  162. {  AppleEvent message class   }
  163.     kAESpeechSuite                = 'sprc';
  164. {  AppleEvent message event ids  }
  165.     kAESpeechDone                = 'srsd';
  166.     kAESpeechDetected            = 'srbd';
  167. {  AppleEvent Parameter ids  }
  168.     keySRRecognizer                = 'krec';
  169.     keySRSpeechResult            = 'kspr';
  170.     keySRSpeechStatus            = 'ksst';
  171. {  AppleEvent Parameter types  }
  172.     typeSRRecognizer            = 'trec';
  173.     typeSRSpeechResult            = 'tspr';
  174. {  SRRecognizer Properties  }
  175.     kSRNotificationParam        = 'noti';                        {  see notification flags below  }
  176.     kSRCallBackParam            = 'call';                        {  type SRCallBackParam  }
  177.     kSRSearchStatusParam        = 'stat';                        {  see status flags below  }
  178.     kSRAutoFinishingParam        = 'afin';                        {  automatic finishing applied on LM for search  }
  179.     kSRForegroundOnly            = 'fgon';                        {  Boolean. Default is true. If true, client recognizer only active when in foreground.     }
  180.     kSRBlockBackground            = 'blbg';                        {  Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.     }
  181.     kSRBlockModally                = 'blmd';                        {  Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods!  }
  182.     kSRWantsResultTextDrawn        = 'txfb';                        {  Boolean. Default is true. If true, search results are posted to Feedback window  }
  183.     kSRWantsAutoFBGestures        = 'dfbr';                        {  Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior  }
  184.     kSRSoundInVolume            = 'volu';                        {  short in [0..100] log scaled sound input power. Can't set this property  }
  185.     kSRReadAudioFSSpec            = 'aurd';                        {  *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF  }
  186.     kSRCancelOnSoundOut            = 'caso';                        {  Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted.  }
  187.     kSRSpeedVsAccuracyParam        = 'sped';                        {  SRSpeedSetting between 0 and 100  }
  188. {  0 means more accurate but slower.  }
  189. {  100 means (much) less accurate but faster.  }
  190.     kSRUseToggleListen            = 0;                            {  listen key modes  }
  191.     kSRUsePushToTalk            = 1;
  192.     kSRListenKeyMode            = 'lkmd';                        {  short: either kSRUseToggleListen or kSRUsePushToTalk  }
  193.     kSRListenKeyCombo            = 'lkey';                        {  short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message  }
  194.     kSRListenKeyName            = 'lnam';                        {  Str63: string representing ListenKeyCombo  }
  195.     kSRKeyWord                    = 'kwrd';                        {  Str255: keyword preceding spoken commands in kSRUseToggleListen mode  }
  196.     kSRKeyExpected                = 'kexp';                        {  Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur?  }
  197. {  Operational Status Flags  }
  198.     kSRIdleRecognizer            = $00000001;                    {  engine is not active  }
  199.     kSRSearchInProgress            = $00000002;                    {  search is in progress  }
  200.     kSRSearchWaitForAllClients    = $00000004;                    {  search is suspended waiting on all clients' input  }
  201.     kSRMustCancelSearch            = $00000008;                    {  something has occurred (sound played, non-speech detected) requiring the search to abort  }
  202.     kSRPendingSearch            = $00000010;                    {  we're about to start searching  }
  203. {  Recognition Result Properties  }
  204.     kSRTEXTFormat                = 'TEXT';                        {  raw text in user supplied memory  }
  205.     kSRPhraseFormat                = 'lmph';                        {  SRPhrase containing result words  }
  206.     kSRPathFormat                = 'lmpt';                        {  SRPath containing result phrases or words  }
  207.     kSRLanguageModelFormat        = 'lmfm';                        {  top level SRLanguageModel for post parse  }
  208. {  SRLanguageObject Family Properties  }
  209.     kSRSpelling                    = 'spel';                        {  spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel  }
  210.     kSRLMObjType                = 'lmtp';                        {  Returns one of SRLanguageObject Types listed below  }
  211.     kSRRefCon                    = 'refc';                        {  4 bytes of user storage  }
  212.     kSROptional                    = 'optl';                        {  Boolean -- true if SRLanguageObject is optional     }
  213.     kSREnabled                    = 'enbl';                        {  Boolean -- true if SRLanguageObject enabled  }
  214.     kSRRepeatable                = 'rptb';                        {  Boolean -- true if SRLanguageObject is repeatable  }
  215.     kSRRejectable                = 'rjbl';                        {  Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord  }
  216.                                                                 {         object can be returned in place of SRLanguageObject with this property)     }
  217.     kSRRejectionLevel            = 'rjct';                        {  SRRejectionLevel between 0 and 100  }
  218. {  LM Object Types -- returned as kSRLMObjType property of language model objects  }
  219.     kSRLanguageModelType        = 'lmob';                        {  SRLanguageModel  }
  220.     kSRPathType                    = 'path';                        {  SRPath  }
  221.     kSRPhraseType                = 'phra';                        {  SRPhrase  }
  222.     kSRWordType                    = 'word';                        {  SRWord  }
  223. {  a normal and reasonable rejection level  }
  224.     kSRDefaultRejectionLevel    = 50;
  225. { ****************************************************************************** }
  226. {                         NOTES ON USING THE API                                     }
  227. {                                                                                  }
  228. {         All operations (with the exception of SRGetRecognitionSystem) are         }
  229. {         directed toward an object allocated or begot from New, Get and Read         }
  230. {         type calls.                                                                 }
  231. {                                                                                  }
  232. {         There is a simple rule in dealing with allocation and disposal:             }
  233. {                                                                                  }
  234. {         *    all toolbox allocations are obtained from a SRRecognitionSystem         }
  235. {                                                                                  }
  236. {         *    if you obtain an object via New or Get, then you own a reference      }
  237. {             to that object and it must be released via SRReleaseObject when         }
  238. {             you no longer need it                                                 }
  239. {                                                                                  }
  240. {         *    when you receive a SRRecognitionResult object via AppleEvent or         }
  241. {             callback, it has essentially been created on your behalf and so         }
  242. {             you are responsible for releasing it as above                         }
  243. {                                                                                  }
  244. {         *    when you close a SRRecognitionSystem, all remaining objects which         }
  245. {             were allocated with it will be forcefully released and any             }
  246. {             remaining references to those objects will be invalid.                 }
  247. {                                                                                  }
  248. {         This translates into a very simple guideline:                             }
  249. {             If you allocate it or have it allocated for you, you must release     }
  250. {             it.  If you are only peeking at it, then don't release it.             }
  251. {                                                                                  }
  252. { ****************************************************************************** }
  253. {  Opening and Closing of the SRRecognitionSystem  }
  254. FUNCTION SROpenRecognitionSystem(VAR system: SRRecognitionSystem; systemID: OSType): OSErr;
  255.     {$IFC NOT GENERATINGCFM}
  256.     INLINE $303C, $0400, $AA56;
  257.     {$ENDC}
  258. FUNCTION SRCloseRecognitionSystem(system: SRRecognitionSystem): OSErr;
  259.     {$IFC NOT GENERATINGCFM}
  260.     INLINE $303C, $0201, $AA56;
  261.     {$ENDC}
  262. {  Accessing Properties of any Speech Object  }
  263. FUNCTION SRSetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; propertyLen: Size): OSErr;
  264.     {$IFC NOT GENERATINGCFM}
  265.     INLINE $303C, $0802, $AA56;
  266.     {$ENDC}
  267. FUNCTION SRGetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; VAR propertyLen: Size): OSErr;
  268.     {$IFC NOT GENERATINGCFM}
  269.     INLINE $303C, $0803, $AA56;
  270.     {$ENDC}
  271. {  Any object obtained via New or Get type calls must be released  }
  272. FUNCTION SRReleaseObject(srObject: SRSpeechObject): OSErr;
  273.     {$IFC NOT GENERATINGCFM}
  274.     INLINE $303C, $0204, $AA56;
  275.     {$ENDC}
  276. FUNCTION SRGetReference(srObject: SRSpeechObject; VAR newObjectRef: SRSpeechObject): OSErr;
  277.     {$IFC NOT GENERATINGCFM}
  278.     INLINE $303C, $0425, $AA56;
  279.     {$ENDC}
  280. {  SRRecognizer Instance Functions  }
  281. FUNCTION SRNewRecognizer(system: SRRecognitionSystem; VAR recognizer: SRRecognizer; sourceID: OSType): OSErr;
  282.     {$IFC NOT GENERATINGCFM}
  283.     INLINE $303C, $060A, $AA56;
  284.     {$ENDC}
  285. FUNCTION SRStartListening(recognizer: SRRecognizer): OSErr;
  286.     {$IFC NOT GENERATINGCFM}
  287.     INLINE $303C, $020C, $AA56;
  288.     {$ENDC}
  289. FUNCTION SRStopListening(recognizer: SRRecognizer): OSErr;
  290.     {$IFC NOT GENERATINGCFM}
  291.     INLINE $303C, $020D, $AA56;
  292.     {$ENDC}
  293. FUNCTION SRSetLanguageModel(recognizer: SRRecognizer; languageModel: SRLanguageModel): OSErr;
  294.     {$IFC NOT GENERATINGCFM}
  295.     INLINE $303C, $040E, $AA56;
  296.     {$ENDC}
  297. FUNCTION SRGetLanguageModel(recognizer: SRRecognizer; VAR languageModel: SRLanguageModel): OSErr;
  298.     {$IFC NOT GENERATINGCFM}
  299.     INLINE $303C, $040F, $AA56;
  300.     {$ENDC}
  301. FUNCTION SRContinueRecognition(recognizer: SRRecognizer): OSErr;
  302.     {$IFC NOT GENERATINGCFM}
  303.     INLINE $303C, $0210, $AA56;
  304.     {$ENDC}
  305. FUNCTION SRCancelRecognition(recognizer: SRRecognizer): OSErr;
  306.     {$IFC NOT GENERATINGCFM}
  307.     INLINE $303C, $0211, $AA56;
  308.     {$ENDC}
  309. FUNCTION SRIdle: OSErr;
  310.     {$IFC NOT GENERATINGCFM}
  311.     INLINE $303C, $0028, $AA56;
  312.     {$ENDC}
  313. {  Language Model Building and Manipulation Functions  }
  314. FUNCTION SRNewLanguageModel(system: SRRecognitionSystem; VAR model: SRLanguageModel; name: UNIV Ptr; nameLength: Size): OSErr;
  315.     {$IFC NOT GENERATINGCFM}
  316.     INLINE $303C, $0812, $AA56;
  317.     {$ENDC}
  318. FUNCTION SRNewPath(system: SRRecognitionSystem; VAR path: SRPath): OSErr;
  319.     {$IFC NOT GENERATINGCFM}
  320.     INLINE $303C, $0413, $AA56;
  321.     {$ENDC}
  322. FUNCTION SRNewPhrase(system: SRRecognitionSystem; VAR phrase: SRPhrase; text: UNIV Ptr; textLength: Size): OSErr;
  323.     {$IFC NOT GENERATINGCFM}
  324.     INLINE $303C, $0814, $AA56;
  325.     {$ENDC}
  326. FUNCTION SRNewWord(system: SRRecognitionSystem; VAR word: SRWord; text: UNIV Ptr; textLength: Size): OSErr;
  327.     {$IFC NOT GENERATINGCFM}
  328.     INLINE $303C, $0815, $AA56;
  329.     {$ENDC}
  330. {  Operations on any object of the SRLanguageObject family  }
  331. FUNCTION SRPutLanguageObjectIntoHandle(languageObject: SRLanguageObject; lobjHandle: Handle): OSErr;
  332.     {$IFC NOT GENERATINGCFM}
  333.     INLINE $303C, $0416, $AA56;
  334.     {$ENDC}
  335. FUNCTION SRPutLanguageObjectIntoDataFile(languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  336.     {$IFC NOT GENERATINGCFM}
  337.     INLINE $303C, $0328, $AA56;
  338.     {$ENDC}
  339. FUNCTION SRNewLanguageObjectFromHandle(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; lObjHandle: Handle): OSErr;
  340.     {$IFC NOT GENERATINGCFM}
  341.     INLINE $303C, $0417, $AA56;
  342.     {$ENDC}
  343. FUNCTION SRNewLanguageObjectFromDataFile(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  344.     {$IFC NOT GENERATINGCFM}
  345.     INLINE $303C, $0427, $AA56;
  346.     {$ENDC}
  347. FUNCTION SREmptyLanguageObject(languageObject: SRLanguageObject): OSErr;
  348.     {$IFC NOT GENERATINGCFM}
  349.     INLINE $303C, $0218, $AA56;
  350.     {$ENDC}
  351. FUNCTION SRChangeLanguageObject(languageObject: SRLanguageObject; text: UNIV Ptr; textLength: Size): OSErr;
  352.     {$IFC NOT GENERATINGCFM}
  353.     INLINE $303C, $0619, $AA56;
  354.     {$ENDC}
  355. FUNCTION SRAddLanguageObject(base: SRLanguageObject; addon: SRLanguageObject): OSErr;
  356.     {$IFC NOT GENERATINGCFM}
  357.     INLINE $303C, $041A, $AA56;
  358.     {$ENDC}
  359. FUNCTION SRAddText(base: SRLanguageObject; text: UNIV Ptr; textLength: Size; refCon: LONGINT): OSErr;
  360.     {$IFC NOT GENERATINGCFM}
  361.     INLINE $303C, $081B, $AA56;
  362.     {$ENDC}
  363. FUNCTION SRRemoveLanguageObject(base: SRLanguageObject; toRemove: SRLanguageObject): OSErr;
  364.     {$IFC NOT GENERATINGCFM}
  365.     INLINE $303C, $041C, $AA56;
  366.     {$ENDC}
  367. {  Traversing SRRecognitionResults or SRLanguageObjects  }
  368. FUNCTION SRCountItems(container: SRSpeechObject; VAR count: LONGINT): OSErr;
  369.     {$IFC NOT GENERATINGCFM}
  370.     INLINE $303C, $0405, $AA56;
  371.     {$ENDC}
  372. FUNCTION SRGetIndexedItem(container: SRSpeechObject; VAR item: SRSpeechObject; index: LONGINT): OSErr;
  373.     {$IFC NOT GENERATINGCFM}
  374.     INLINE $303C, $0606, $AA56;
  375.     {$ENDC}
  376. FUNCTION SRSetIndexedItem(container: SRSpeechObject; item: SRSpeechObject; index: LONGINT): OSErr;
  377.     {$IFC NOT GENERATINGCFM}
  378.     INLINE $303C, $0607, $AA56;
  379.     {$ENDC}
  380. FUNCTION SRRemoveIndexedItem(container: SRSpeechObject; index: LONGINT): OSErr;
  381.     {$IFC NOT GENERATINGCFM}
  382.     INLINE $303C, $0408, $AA56;
  383.     {$ENDC}
  384. {  Utilizing the System Feedback Window  }
  385. FUNCTION SRDrawText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  386.     {$IFC NOT GENERATINGCFM}
  387.     INLINE $303C, $0621, $AA56;
  388.     {$ENDC}
  389. FUNCTION SRDrawRecognizedText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  390.     {$IFC NOT GENERATINGCFM}
  391.     INLINE $303C, $0622, $AA56;
  392.     {$ENDC}
  393. FUNCTION SRSpeakText(recognizer: SRRecognizer; speakText: UNIV Ptr; speakLength: Size): OSErr;
  394.     {$IFC NOT GENERATINGCFM}
  395.     INLINE $303C, $0620, $AA56;
  396.     {$ENDC}
  397. FUNCTION SRSpeakAndDrawText(recognizer: SRRecognizer; text: UNIV Ptr; textLength: Size): OSErr;
  398.     {$IFC NOT GENERATINGCFM}
  399.     INLINE $303C, $061F, $AA56;
  400.     {$ENDC}
  401. FUNCTION SRStopSpeech(recognizer: SRRecognizer): OSErr;
  402.     {$IFC NOT GENERATINGCFM}
  403.     INLINE $303C, $0223, $AA56;
  404.     {$ENDC}
  405. FUNCTION SRSpeechBusy(recognizer: SRRecognizer): BOOLEAN;
  406.     {$IFC NOT GENERATINGCFM}
  407.     INLINE $303C, $0224, $AA56;
  408.     {$ENDC}
  409. FUNCTION SRProcessBegin(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  410.     {$IFC NOT GENERATINGCFM}
  411.     INLINE $303C, $031D, $AA56;
  412.     {$ENDC}
  413. FUNCTION SRProcessEnd(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  414.     {$IFC NOT GENERATINGCFM}
  415.     INLINE $303C, $031E, $AA56;
  416.     {$ENDC}
  417. {$ALIGN RESET}
  418. {$POP}
  419.  
  420. {$SETC UsingIncludes := SpeechRecognitionIncludes}
  421.  
  422. {$ENDC} {__SPEECHRECOGNITION__}
  423.  
  424. {$IFC NOT UsingIncludes}
  425.  END.
  426. {$ENDC}
  427.